Skip to content

Add imagen editing cases to the Firebase AI quickstart #2702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

davidmotson
Copy link
Contributor

@davidmotson davidmotson commented Jul 16, 2025

Adds Imagen Editing cases to the quickstart including:

  • Inpainting
  • Outpainting
  • Subject References
  • Style Transfer

@davidmotson davidmotson changed the title Davidmotson.imagen editing Add imagen editing cases to the Firebase AI quickstart Jul 16, 2025
@rlazo
Copy link
Contributor

rlazo commented Jul 23, 2025

Please add a description to the PR

@rlazo rlazo closed this Jul 23, 2025
@rlazo rlazo reopened this Jul 23, 2025
@davidmotson davidmotson requested a review from thatfiredev July 29, 2025 17:22
val tools: List<Tool>? = null,
val includeAttach: Boolean = false,
val allowEmptyPrompt: Boolean = false,
val generateImages: (suspend (ImagenModel, String, Bitmap?) -> ImagenGenerationResponse<ImagenInlineImage>)? = null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than passing a suspend function here, what if we pass the List<ImagenReferenceImage> and prompt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That may not work as an abstraction, sometimes editing settings also need to be set, basically every parameter, depending on the use case.

@@ -36,6 +39,7 @@ class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
catImage = BitmapFactory.decodeResource(applicationContext.resources, R.drawable.cat)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move the Imagen editing features to a new screen+viewmodel ?
And we can load this bitmap from there, rather than from the MainActivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants